package com.yishusmt.mobsmt.controller;

import com.yishusmt.mobsmt.dto.base.Result;
import com.yishusmt.mobsmt.service.VersionControlService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 版本控制
 *
 * @author zhangyi
 * @date 2018/8/16 17:23
 */
@RestController
@RequestMapping("/version")
public class VersionControlController {

    @Resource
    private VersionControlService versionControlService;


    /**
     * 版本更新设置
     *
     * @param version
     * @return
     */
    @GetMapping("/versionCode/{code}")
    @ApiOperation(value = "更新本地版本",httpMethod = "GET")
    public Result versionControl(@PathVariable(value = "code") String version){
        return versionControlService.versionControl(version);
    }
}
